<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>鸿蒙教育平台 - 就业数据管理</title>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }
        
        :root {
            --primary: #3498db;
            --secondary: #2ecc71;
            --accent: #9b59b6;
            --dark: #2c3e50;
            --light: #ecf0f1;
            --danger: #e74c3c;
            --warning: #f39c12;
        }
        
        body {
            background-color: #f5f7fa;
            color: #333;
            min-height: 100vh;
        }
        
        .container {
            display: flex;
            min-height: 100vh;
        }
        
        /* 侧边栏样式 */
        .sidebar {
            width: 250px;
            background: var(--dark);
            color: white;
            padding: 20px 0;
            box-shadow: 3px 0 10px rgba(0,0,0,0.1);
            position: fixed;
            height: 100vh;
            z-index: 100;
        }
        
        .logo {
            padding: 0 20px 20px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            margin-bottom: 20px;
            display: flex;
            align-items: center;
        }
        
        .logo i {
            font-size: 28px;
            color: var(--primary);
            margin-right: 10px;
        }
        
        .logo h1 {
            font-size: 22px;
            font-weight: 600;
        }
        
        .nav-links {
            list-style: none;
        }
        
        .nav-links li {
            padding: 12px 20px;
            transition: all 0.3s;
            cursor: pointer;
            display: flex;
            align-items: center;
        }
        
        .nav-links li:hover, .nav-links li.active {
            background: rgba(255,255,255,0.1);
            border-left: 4px solid var(--primary);
        }
        
        .nav-links li i {
            margin-right: 12px;
            width: 24px;
            text-align: center;
            font-size: 18px;
        }
        
        .nav-links li span {
            font-size: 16px;
        }
        
        /* 主内容区域 */
        .main-content {
            flex: 1;
            margin-left: 250px;
            padding: 20px;
        }
        
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 0;
            border-bottom: 1px solid #e0e6ed;
            margin-bottom: 25px;
        }
        
        .user-info {
            display: flex;
            align-items: center;
        }
        
        .user-info img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 10px;
            object-fit: cover;
            border: 2px solid var(--primary);
        }
        
        .user-details {
            display: flex;
            flex-direction: column;
        }
        
        .user-name {
            font-weight: 600;
            font-size: 16px;
        }
        
        .user-role {
            font-size: 13px;
            color: #7f8c8d;
        }
        
        .search-bar {
            display: flex;
            background: white;
            border-radius: 30px;
            padding: 8px 15px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
            width: 300px;
        }
        
        .search-bar input {
            border: none;
            outline: none;
            flex: 1;
            padding: 0 10px;
        }
        
        .search-bar button {
            background: none;
            border: none;
            color: var(--primary);
            cursor: pointer;
        }
        
        /* 卡片样式 */
        .dashboard-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            padding: 20px;
            transition: transform 0.3s ease;
        }
        
        .card:hover {
            transform: translateY(-5px);
        }
        
        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .card-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--dark);
        }
        
        .card-icon {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
        }
        
        .card-content {
            font-size: 28px;
            font-weight: 700;
            margin: 10px 0;
        }
        
        .card-footer {
            font-size: 14px;
            color: #7f8c8d;
            display: flex;
            align-items: center;
        }
        
        .card-footer i {
            margin-right: 5px;
        }
        
        .positive {
            color: var(--secondary);
        }
        
        /* 图表区域 */
        .chart-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .chart-container {
            background: white;
            border-radius: 12px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            padding: 20px;
            height: 350px;
        }
        
        .chart-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .chart-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--dark);
        }
        
        /* 数据表格 */
        .data-section {
            background: white;
            border-radius: 12px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            padding: 20px;
            margin-bottom: 30px;
        }
        
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .section-title {
            font-size: 20px;
            font-weight: 600;
            color: var(--dark);
        }
        
        .section-actions button {
            background: var(--primary);
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
        }
        
        .section-actions button i {
            margin-right: 5px;
        }
        
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }
        
        .data-table th {
            background: #f8f9fa;
            text-align: left;
            padding: 12px 15px;
            font-weight: 600;
            color: var(--dark);
            border-bottom: 1px solid #e0e6ed;
        }
        
        .data-table td {
            padding: 12px 15px;
            border-bottom: 1px solid #e0e6ed;
        }
        
        .data-table tr:hover {
            background-color: #f8f9fa;
        }
        
        .status-badge {
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
        }
        
        .status-employed {
            background: #e1f3e6;
            color: var(--secondary);
        }
        
        .status-job-seeking {
            background: #fef5e7;
            color: var(--warning);
        }
        
        .status-higher-edu {
            background: #f4e8fd;
            color: var(--accent);
        }
        
        /* 响应式设计 */
        @media (max-width: 992px) {
            .sidebar {
                width: 70px;
            }
            
            .logo h1, .nav-links li span {
                display: none;
            }
            
            .logo {
                justify-content: center;
            }
            
            .nav-links li {
                justify-content: center;
            }
            
            .nav-links li i {
                margin-right: 0;
                font-size: 20px;
            }
            
            .main-content {
                margin-left: 70px;
            }
            
            .search-bar {
                width: 200px;
            }
        }
        
        @media (max-width: 768px) {
            .chart-row {
                grid-template-columns: 1fr;
            }
            
            .search-bar {
                display: none;
            }
        }
        
        /* 动画效果 */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .animated {
            animation: fadeIn 0.5s ease forwards;
        }
        
        .delay-1 { animation-delay: 0.1s; }
        .delay-2 { animation-delay: 0.2s; }
        .delay-3 { animation-delay: 0.3s; }
        .delay-4 { animation-delay: 0.4s; }
    </style>
</head>
<body>
    <div class="container">
        <!-- 侧边导航 -->
        <div class="sidebar">
            <div class="logo">
                <i class="fas fa-graduation-cap"></i>
                <h1>鸿蒙教育平台</h1>
            </div>
            <ul class="nav-links">
                <li class="active">
                    <i class="fas fa-home"></i>
                    <span>控制面板</span>
                </li>
                <li>
                    <i class="fas fa-user-graduate"></i>
                    <span>学生管理</span>
                </li>
                <li>
                    <i class="fas fa-chart-line"></i>
                    <span>就业数据分析</span>
                </li>
                <li>
                    <i class="fas fa-briefcase"></i>
                    <span>就业信息管理</span>
                </li>
                <li>
                    <i class="fas fa-building"></i>
                    <span>企业合作</span>
                </li>
                <li>
                    <i class="fas fa-cog"></i>
                    <span>系统设置</span>
                </li>
            </ul>
        </div>
        
        <!-- 主内容区域 -->
        <div class="main-content">
            <div class="header">
                <div class="user-info">
                    <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="用户头像">
                    <div class="user-details">
                        <div class="user-name">张老师</div>
                        <div class="user-role">计算机学院 - 教授</div>
                    </div>
                </div>
                <div class="search-bar">
                    <input type="text" placeholder="搜索学生、班级或企业...">
                    <button><i class="fas fa-search"></i></button>
                </div>
            </div>
            
            <!-- 数据卡片 -->
            <div class="dashboard-cards">
                <div class="card animated">
                    <div class="card-header">
                        <div class="card-title">学生总数</div>
                        <div class="card-icon" style="background: #e1f3e6; color: var(--secondary);">
                            <i class="fas fa-users"></i>
                        </div>
                    </div>
                    <div class="card-content">1,248</div>
                    <div class="card-footer">
                        <i class="fas fa-arrow-up positive"></i>
                        <span class="positive">12.5% 同比增长</span>
                    </div>
                </div>
                
                <div class="card animated delay-1">
                    <div class="card-header">
                        <div class="card-title">就业率</div>
                        <div class="card-icon" style="background: #e1f7f9; color: #3498db;">
                            <i class="fas fa-briefcase"></i>
                        </div>
                    </div>
                    <div class="card-content">94.7%</div>
                    <div class="card-footer">
                        <i class="fas fa-arrow-up positive"></i>
                        <span class="positive">3.2% 同比增长</span>
                    </div>
                </div>
                
                <div class="card animated delay-2">
                    <div class="card-header">
                        <div class="card-title">平均薪资</div>
                        <div class="card-icon" style="background: #fef5e7; color: var(--warning);">
                            <i class="fas fa-money-bill-wave"></i>
                        </div>
                    </div>
                    <div class="card-content">¥15,800</div>
                    <div class="card-footer">
                        <i class="fas fa-arrow-up positive"></i>
                        <span class="positive">8.3% 同比增长</span>
                    </div>
                </div>
                
                <div class="card animated delay-3">
                    <div class="card-header">
                        <div class="card-title">深造率</div>
                        <div class="card-icon" style="background: #f4e8fd; color: var(--accent);">
                            <i class="fas fa-university"></i>
                        </div>
                    </div>
                    <div class="card-content">18.2%</div>
                    <div class="card-footer">
                        <i class="fas fa-arrow-up positive"></i>
                        <span class="positive">2.1% 同比增长</span>
                    </div>
                </div>
            </div>
            
            <!-- 图表区域 -->
            <div class="chart-row">
                <div class="chart-container animated">
                    <div class="chart-header">
                        <div class="chart-title">就业率趋势分析</div>
                    </div>
                    <canvas id="employmentRateChart"></canvas>
                </div>
                
                <div class="chart-container animated delay-1">
                    <div class="chart-header">
                        <div class="chart-title">行业分布分析</div>
                    </div>
                    <canvas id="industryDistributionChart"></canvas>
                </div>
                
                <div class="chart-container animated delay-2">
                    <div class="chart-header">
                        <div class="chart-title">薪资区间分布</div>
                    </div>
                    <canvas id="salaryDistributionChart"></canvas>
                </div>
                
                <div class="chart-container animated delay-3">
                    <div class="chart-header">
                        <div class="chart-title">就业趋势预测</div>
                    </div>
                    <canvas id="trendPredictionChart"></canvas>
                </div>
            </div>
            
            <!-- 学生就业数据 -->
            <div class="data-section">
                <div class="section-header">
                    <div class="section-title">学生就业信息</div>
                    <div class="section-actions">
                        <button><i class="fas fa-download"></i> 导出数据</button>
                    </div>
                </div>
                <table class="data-table">
                    <thead>
                        <tr>
                            <th>学号</th>
                            <th>姓名</th>
                            <th>专业</th>
                            <th>班级</th>
                            <th>就业状态</th>
                            <th>就业企业</th>
                            <th>职位</th>
                            <th>月薪(元)</th>
                            <th>就业城市</th>
                        </tr>
                    </thead>
                    <tbody id="employmentData">
                        <!-- 数据将通过JS动态生成 -->
                    </tbody>
                </table>
            </div>
        </div>
    </div>

    <script>
        // 模拟数据 - 学生就业信息
        const employmentData = [
            { id: '2021001', name: '张明', major: '计算机科学与技术', class: '计算机2001', status: '已就业', company: '华为技术有限公司', position: '软件工程师', salary: 18000, city: '深圳' },
            { id: '2021002', name: '李华', major: '软件工程', class: '软件2002', status: '已就业', company: '腾讯科技', position: '前端开发工程师', salary: 16500, city: '北京' },
            { id: '2021003', name: '王芳', major: '人工智能', class: '人工智能2001', status: '继续深造', company: '清华大学', position: '研究生', salary: 0, city: '北京' },
            { id: '2021004', name: '赵强', major: '数据科学', class: '数据2001', status: '已就业', company: '阿里巴巴', position: '数据分析师', salary: 17500, city: '杭州' },
            { id: '2021005', name: '刘伟', major: '电子信息工程', class: '电子2001', status: '待就业', company: '', position: '', salary: 0, city: '' },
            { id: '2021006', name: '陈晓', major: '网络工程', class: '网络2001', status: '已就业', company: '字节跳动', position: '后端开发工程师', salary: 19500, city: '上海' },
            { id: '2021007', name: '杨洋', major: '计算机科学与技术', class: '计算机2001', status: '自主创业', company: '星辰科技', position: '创始人', salary: 0, city: '广州' },
            { id: '2021008', name: '周婷', major: '软件工程', class: '软件2002', status: '已就业', company: '百度', position: '产品经理', salary: 15500, city: '北京' },
            { id: '2021009', name: '吴磊', major: '人工智能', class: '人工智能2001', status: '已就业', company: '商汤科技', position: '算法工程师', salary: 22000, city: '上海' },
            { id: '2021010', name: '郑浩', major: '数据科学', class: '数据2001', status: '继续深造', company: '北京大学', position: '研究生', salary: 0, city: '北京' }
        ];
        
        // 模拟数据 - 就业率趋势
        const employmentRateData = {
            labels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月'],
            datasets: [{
                label: '2023年就业率',
                data: [65, 72, 78, 82, 86, 90, 92],
                borderColor: '#3498db',
                backgroundColor: 'rgba(52, 152, 219, 0.1)',
                tension: 0.3,
                fill: true
            }, {
                label: '2024年就业率',
                data: [68, 75, 81, 87, 90, 93, 95],
                borderColor: '#2ecc71',
                backgroundColor: 'rgba(46, 204, 113, 0.1)',
                tension: 0.3,
                fill: true
            }]
        };
        
        // 模拟数据 - 行业分布
        const industryData = {
            labels: ['互联网/IT', '金融', '教育', '制造业', '医疗健康', '其他'],
            datasets: [{
                data: [45, 18, 12, 10, 8, 7],
                backgroundColor: [
                    '#3498db', '#2ecc71', '#9b59b6', '#e74c3c', '#f39c12', '#7f8c8d'
                ]
            }]
        };
        
        // 模拟数据 - 薪资区间
        const salaryData = {
            labels: ['<8K', '8K-12K', '12K-16K', '16K-20K', '>20K'],
            datasets: [{
                label: '学生数量',
                data: [5, 25, 45, 30, 15],
                backgroundColor: '#3498db',
                borderColor: '#2980b9',
                borderWidth: 1
            }]
        };
        
        // 模拟数据 - 就业趋势预测
        const trendData = {
            labels: ['2024Q1', '2024Q2', '2024Q3', '2024Q4', '2025Q1', '2025Q2'],
            datasets: [{
                label: '预测就业率',
                data: [92, 93, 94, 95, 96, 97],
                borderColor: '#9b59b6',
                backgroundColor: 'rgba(155, 89, 182, 0.1)',
                tension: 0.3,
                fill: true
            }]
        };
        
        // 渲染学生就业数据表格
        function renderEmploymentTable() {
            const tableBody = document.getElementById('employmentData');
            tableBody.innerHTML = '';
            
            employmentData.forEach(student => {
                const row = document.createElement('tr');
                
                // 根据就业状态设置样式
                let statusClass = '';
                let statusText = '';
                
                switch(student.status) {
                    case '已就业':
                        statusClass = 'status-employed';
                        statusText = '已就业';
                        break;
                    case '待就业':
                        statusClass = 'status-job-seeking';
                        statusText = '待就业';
                        break;
                    case '继续深造':
                        statusClass = 'status-higher-edu';
                        statusText = '继续深造';
                        break;
                    case '自主创业':
                        statusClass = 'status-employed';
                        statusText = '自主创业';
                        break;
                    default:
                        statusClass = 'status-job-seeking';
                        statusText = '待就业';
                }
                
                row.innerHTML = `
                    <td>${student.id}</td>
                    <td>${student.name}</td>
                    <td>${student.major}</td>
                    <td>${student.class}</td>
                    <td><span class="status-badge ${statusClass}">${statusText}</span></td>
                    <td>${student.company || '-'}</td>
                    <td>${student.position || '-'}</td>
                    <td>${student.salary > 0 ? student.salary.toLocaleString() : '-'}</td>
                    <td>${student.city || '-'}</td>
                `;
                
                tableBody.appendChild(row);
            });
        }
        
        // 初始化图表
        function initCharts() {
            // 就业率趋势图
            new Chart(
                document.getElementById('employmentRateChart'),
                {
                    type: 'line',
                    data: employmentRateData,
                    options: {
                        responsive: true,
                        maintainAspectRatio: false,
                        plugins: {
                            legend: {
                                position: 'top',
                            },
                            title: {
                                display: false
                            }
                        },
                        scales: {
                            y: {
                                min: 50,
                                max: 100,
                                ticks: {
                                    callback: function(value) {
                                        return value + '%';
                                    }
                                }
                            }
                        }
                    }
                }
            );
            
            // 行业分布图
            new Chart(
                document.getElementById('industryDistributionChart'),
                {
                    type: 'doughnut',
                    data: industryData,
                    options: {
                        responsive: true,
                        maintainAspectRatio: false,
                        plugins: {
                            legend: {
                                position: 'right',
                            }
                        }
                    }
                }
            );
            
            // 薪资区间图
            new Chart(
                document.getElementById('salaryDistributionChart'),
                {
                    type: 'bar',
                    data: salaryData,
                    options: {
                        responsive: true,
                        maintainAspectRatio: false,
                        plugins: {
                            legend: {
                                display: false
                            }
                        },
                        scales: {
                            y: {
                                beginAtZero: true
                            }
                        }
                    }
                }
            );
            
            // 就业趋势预测图
            new Chart(
                document.getElementById('trendPredictionChart'),
                {
                    type: 'line',
                    data: trendData,
                    options: {
                        responsive: true,
                        maintainAspectRatio: false,
                        plugins: {
                            legend: {
                                position: 'top',
                            }
                        },
                        scales: {
                            y: {
                                min: 90,
                                max: 100,
                                ticks: {
                                    callback: function(value) {
                                        return value + '%';
                                    }
                                }
                            }
                        }
                    }
                }
            );
        }
        
        // 页面加载完成后初始化
        window.onload = function() {
            renderEmploymentTable();
            initCharts();
        };
    </script>
</body>
</html>